-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on by default: –x-dev-env #6408
Conversation
🦋 Changeset detectedLatest commit: 374bdf4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11128655826/npm-package-wrangler-6408 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6408/npm-package-wrangler-6408 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11128655826/npm-package-wrangler-6408 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11128655826/npm-package-create-cloudflare-6408 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11128655826/npm-package-cloudflare-kv-asset-handler-6408 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11128655826/npm-package-miniflare-6408 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11128655826/npm-package-cloudflare-pages-shared-6408 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11128655826/npm-package-cloudflare-vitest-pool-workers-6408 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11128655826/npm-package-cloudflare-workers-editor-shared-6408 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11128655826/npm-package-cloudflare-workers-shared-6408 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
26b3311
to
2092945
Compare
: "http", | ||
}); | ||
|
||
if (typeof vitest === "undefined") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to env var to disable watching
} catch (err) { | ||
logger.error(err); | ||
const assets = processAssetsArg({ assets: input?.assets }, fileConfig); | ||
if (assets && typeof vitest === "undefined") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
env?: string; | ||
legacyEnv?: boolean; | ||
host?: string; | ||
env: string | undefined; | ||
legacyEnv: boolean | undefined; | ||
host: string | undefined; | ||
routes: Route[] | undefined; | ||
sendMetrics?: boolean; | ||
sendMetrics: boolean | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will prevent that missing host
prop from happening again 👍
I can't approve my own PR – but LGTM! ✅ |
@@ -361,40 +363,66 @@ export function processAssetsArg( | |||
* - an asset binding cannot be used in a Worker that only has assets | |||
* and throw an appropriate error if invalid. | |||
*/ | |||
export function validateAssetsArgsAndConfig( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just making sure i've got this right, args
in the first overload is after config and args have been combined?
@@ -4303,6 +4303,31 @@ addEventListener('fetch', event => {});` | |||
); | |||
}); | |||
|
|||
it("should error if --assets and config.tail_consumers are used together", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding these in :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 2 tests were moved from dev.test.ts(x)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for tidying up the assets/legacy assets options
c0f93db
to
374bdf4
Compare
What this PR solves / how to test
Fixes DEVX-1298
This PR updates the default value for
--x-dev-env
forwrangler dev
(not yet forwrangler pages dev
).It also updates the e2e tests (which assumed the default value was false) to explicitly test with the flag on + off (TODO: need to update the snapshots because this changed the test names)
Author has addressed the following